home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / JForth / Textra120 / Docs / Using AlphaSpell < prev    next >
Encoding:
Text File  |  1996-10-28  |  1.7 KB  |  70 lines

  1.  
  2. Fergus Duniho's  excellent AlphaSpell supports Textra, and is
  3. definitely a welcome accessory.  This well-done application
  4. provides convenient spell-checking to Textra with the touch
  5. of a key!
  6.  
  7. Unfortunately, Fergus' Textra script has a problem, but
  8. both the fix and directions for applying it are below.
  9.  
  10. FYI, I used AlphaSpell 6.2 for determining the below info.
  11. No idea if this applies to other versions.  I suggest
  12. you direct AlphaSpell-related questions to Fergus.
  13.  
  14. How to apply the fix...
  15.  
  16. 1. Open up the "ASpell.textra" script.
  17.  
  18. 2. Locate the "Findword" procedure.  It should look like this:
  19.  
  20.       FindWord: PROCEDURE
  21.       read target
  22.       wrd = RESULT /* Reads selected word */
  23.       ADDRESS
  24.       IF arg(1) = 0 THEN GOTOXY 0 0
  25.       DO FOREVER
  26.           FIND wrd
  27.           IF RESULT = "NOT FOUND" THEN DO
  28.               GOTOXY 0 0
  29.               LEAVE
  30.           END
  31.           GET cursor position
  32.           PARSE VAR RESULT col row
  33.           GET line row
  34.           IF WordComp(RESULT, wrd, col) = 1 THEN LEAVE
  35.       END
  36.  
  37. 3. Change these two lines...
  38.  
  39.       GET cursor position
  40.       PARSE VAR RESULT col row
  41.  
  42.    ...to...
  43.    
  44.       GET select position
  45.       PARSE VAR RESULT col' 'row' 'xxx' 'yyy
  46.  
  47. 4. Here's the new "Findword" in its entirety...
  48.  
  49.       FindWord: PROCEDURE
  50.       read target
  51.       wrd = RESULT /* Reads selected word */
  52.       ADDRESS
  53.       IF arg(1) = 0 THEN GOTOXY 0 0
  54.       DO FOREVER
  55.           FIND wrd
  56.           IF RESULT = "NOT FOUND" THEN DO
  57.               GOTOXY 0 0
  58.               LEAVE
  59.           END
  60.           GET select position
  61.           PARSE VAR RESULT col' 'row' 'xxx' 'yyy
  62.           GET line row
  63.           IF WordComp(RESULT, wrd, col) = 1 THEN LEAVE
  64.       END
  65.  
  66. That's all, folks!
  67.  
  68. Mike Haas
  69.  
  70.